/*
 * Copyright 2010-2016 the original author or authors.
 * 
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 文件：test.User.java
 * 日 期：Tue Feb 07 11:16:06 CST 2012
 */
package test;

import java.sql.Timestamp;
import java.sql.Date;

import org.uorm.orm.annotation.ClassMapping;
import org.uorm.orm.annotation.FieldMapping;

/**
 *
 * this file is generated by the uorm pojo tools.
 *
 * @author <a href="mailto:xunchangguo@gmail.com">郭训常</a>
 * @version 1.0.0
 */
@ClassMapping(tableName = "UUM_USER", keyGenerator = "increment")
public class User extends BaseUser {//implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public static String PROP_ADDRESS = "ADDRESS";
	public static String PROP_BIRTHDAY = "BIRTHDAY";
	public static String PROP_CREATE_TIME = "CREATE_TIME";
	public static String PROP_DESCRIPTION = "DESCRIPTION";
	public static String PROP_EMAIL = "EMAIL";
	public static String PROP_ID = "ID";
	public static String PROP_LOGIN_NAME = "LOGIN_NAME";
	public static String PROP_PASSWORD = "PASSWORD";
	public static String PROP_SEX = "SEX";
	public static String PROP_STATE = "STATE";
	public static String PROP_USER_CARD = "USER_CARD";
	public static String PROP_USER_NAME = "USER_NAME";
	public static String PROP_USER_TYPE = "USER_TYPE";
	
	//primary key field of id
	@FieldMapping(columnName = "ID", columnType = 4, primary = true)
	private Long id;
	@FieldMapping(columnName = "ADDRESS", columnType = 12)
	private String address;
	@FieldMapping(columnName = "BIRTHDAY", columnType = 93)
	private Date birthday;
	@FieldMapping(columnName = "CREATE_TIME", columnType = 93)
	private Timestamp createTime;
	@FieldMapping(columnName = "DESCRIPTION", columnType = 12)
	private String description;
	@FieldMapping(columnName = "EMAIL", columnType = 12)
	private String email;
	@FieldMapping(columnName = "LOGIN_NAME", columnType = 12)
	private String loginName;
	@FieldMapping(columnName = "PASSWORD", columnType = 12)
	private String password;
	@FieldMapping(columnName = "SEX", columnType = 4)
	private Integer sex;
	@FieldMapping(columnName = "STATE", columnType = 4)
	private Double state;
	
	public User() {
		super();
	}

	public User(Long id) {
		this.id = id;
	}

	/**
	 * @return the address
	 */
	public String getAddress() {
		return this.address;
	}
	
	/**
	 * @param address the address to set
	 */
	public void setAddress(String value) {
		this.address = value;
	}

	/**
	 * @return the birthday
	 */
	public Date getBirthday() {
		return this.birthday;
	}
	
	/**
	 * @param birthday the birthday to set
	 */
	public void setBirthday(Date value) {
		this.birthday = value;
	}

	/**
	 * @return the createTime
	 */
	public Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(Timestamp value) {
		this.createTime = value;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return this.description;
	}
	
	/**
	 * @param description the description to set
	 */
	public void setDescription(String value) {
		this.description = value;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return this.email;
	}
	
	/**
	 * @param email the email to set
	 */
	public void setEmail(String value) {
		this.email = value;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return this.id;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(Long value) {
		this.id = value;
	}

	/**
	 * @return the loginName
	 */
	public String getLoginName() {
		return this.loginName;
	}
	
	/**
	 * @param loginName the loginName to set
	 */
	public void setLoginName(String value) {
		this.loginName = value;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return this.password;
	}
	
	/**
	 * @param password the password to set
	 */
	public void setPassword(String value) {
		this.password = value;
	}

	/**
	 * @return the sex
	 */
	public Integer getSex() {
		return this.sex;
	}
	
	/**
	 * @param sex the sex to set
	 */
	public void setSex(Integer value) {
		this.sex = value;
	}

	/**
	 * @return the state
	 */
	public Double getState() {
		return this.state;
	}
	
	/**
	 * @param state the state to set
	 */
	public void setState(Double value) {
		this.state = value;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object o) {
		if ((o == null) || !(o instanceof User)) {
			return false;
		}
		User other = (User)o;
		if (null == this.id) {
			if (other.id != null)
				return false;
		} else if (!this.id.equals(other.id))
			return false;
		return true;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	
}